Allow 'completion-preview-require-minimum-symbol-length' to be nil
authorEshel Yaron <me@eshelyaron.com>
Wed, 5 Jun 2024 08:03:06 +0000 (10:03 +0200)
committerEshel Yaron <me@eshelyaron.com>
Wed, 5 Jun 2024 10:09:56 +0000 (12:09 +0200)
commitc11fe940064724e5c41af20fdb0f60c49952f936
tree33dff5bf7d5b5b2dd4a73d331e0db48669f51ff9
parentb2ed1ed1d87c9a3c306554ab7a653717450cc562
Allow 'completion-preview-require-minimum-symbol-length' to be nil

With some completion backends, completion preview is useful not only
after a partial symbol, but also after punctuation and other non-symbol
characters.  For example, in C code it's helpful to display the
completion preview for struct members when point is after 'foo->'.
Provide an option to skip the check for minimum symbol length at point
in order to support this use case.

* lisp/completion-preview.el
(completion-preview-minimum-symbol-length): Mention possible nil
value in type and docstring.
(completion-preview-require-minimum-symbol-length): Skip check
if 'completion-preview-minimum-symbol-length' is nil.
lisp/completion-preview.el